//
//  CZStatusNormalCell.m
//  XinLang_OC
//
//  Created by WONG on 16/3/16.
//  Copyright © 2016年 cheuhui. All rights reserved.
//

#import "CZStatusNormalCell.h"
#import "CZPictureView.h"

@implementation CZStatusNormalCell


- (void)setStatus:(CZStatus *)status {
    [super setStatus:status];
    /*
     更新约束
     */
    [self.pictureView mas_updateConstraints:^(MASConstraintMaker *make) {
        make.size.mas_equalTo(self.size);
        make.left.equalTo(self).offset(8);
        make.top.equalTo(self.contentLabel.mas_bottom).offset(8);
    }];
}

- (void)prepareUI {
    [super prepareUI];
    
    // 拿到配图数据，计算size，重新更新约束
    [self.pictureView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.size.mas_equalTo(self.size);
        make.left.equalTo(self).offset(8);
        make.top.equalTo(self.contentLabel.mas_bottom).offset(8);
    }];
}



@end
